﻿Imports Phila
Imports Phila.Sql
Imports Phila.CommonClasses
Imports Phila.PhilaWebService

Public Class Phila
    Inherits System.Web.UI.MasterPage

    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        If Session("UserID") Is Nothing Then
            plLogin.Visible = True
            plWelcome.Visible = False
            'ltrWelcome.Text = "<span class=""signup"">Have an account? <a href=""Login.aspx"">Login</a> or <a href=""Register.aspx"">Sign Up</a></span>"
        Else
            plLogin.Visible = False
            plWelcome.Visible = True
            hlUser.Text = Session("Username")
            'ltrWelcome.Text = "<span class=""signup"">Welcome <a href=""MyAccount.aspx"">" & Session("Username") & "</a> | <a href=""Logout.aspx"">Logout</a></span>"
        End If
    End Sub

    Private Sub cmdLogout_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles cmdLogout.Click
        Session.Item("UserID") = ""
        Session.Item("UserName") = ""
        Session.Clear()
        Response.Redirect("Login.aspx")
    End Sub
End Class